<template>
  <div id="app">
    <div id="stage">
      <div id="snack">
        <!-- 蛇各部分 -->
        <div></div>
      </div>

      <div id="food">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
      </div>

    </div>
    <div id="score-panel">
      <div>
        SCORE: <span id="score">0</span>
      </div>
      <div>
        level: <span id="level">1</span>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Options, Vue } from "vue-class-component";

@Options({
  components: {},
})
export default class App extends Vue {}
</script>

<style lang="less" >
@bg-color: #b7d4a8;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font: bold 20px "Courier";
}
#app {
  font: bold 20px "Courier";
  width: 360px;
  height: 420px;
  background-color: #b7d4a8;
  margin: 100px auto;
  // border: 10px solid black;
  border-radius: 40px;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: space-around;
  #stage {
    width: 304px;
    height: 304px;
    border: 2px solid black;
    position: relative;
    #snack {
      div {
        width: 10px;
        height: 10px;
        background-color: #000;
        border: 1px solid @bg-color;
        position: absolute;
      }
    }
    #food {
      width: 10px;
      height: 10px;
      display: flex;
      flex-flow: row wrap;
      justify-content: space-between;
      align-content: space-between;
      position: absolute;
      left: 40px;
      top: 100px;
      & > div {
        width: 4px;
        height: 4px;
        background-color: black;
        transform: rotate(45deg);
      }
    }
  }
  #score-panel {
    width: 300px;
    display: flex;
    justify-content: space-between;
  }
}
</style>
